package h1;

import java.net.InetAddress;
import java.util.Scanner;

public class IneAddressDemo {
    public static void main(String[] args) throws Exception{

        InetAddress address = InetAddress.getByName("10.129.114.163");
        String name=address.getHostName();
        String ip = address.getHostAddress();
        System.out.println("主机名："+name);
        System.out.println("ip地址"+ip);




    }
}
